#include <netinet/in.h>
#include <netdb.h>
#include <string.h>
#include <malloc.h>

#include "include/parser.h"
#include "include/server.h"
#include "include/socket.h"
#include "include/sql.h"
#include "include/acsLogger.h"
#include "include/start-stop.h"


 char *server;        //host
 char *user;         //username
 char *password;    //password
 char *database;   //DataBase
 
void initDBase()
{
  server = malloc(100);
  user = malloc(100);
  password = malloc(100);
  database = malloc(100);
  
   memset(server,0,100);
   memset(user,0,100);
   memset(password,0,100);
   memset(database,0,100);
   
  initDBaseParameters("./config/dbase.config",server,user,password,database);

}

int main ( void )
{
  write_in_file(1);
  trace("starting server");
  initDBase();
  //Make a socket
  sock = make_socket(PORT);
  connection( sock );
  
  return 0;
}
